package com.smag.system.mapper;

import com.smag.common.core.domain.entity.FarmProduct;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
* @author hzqhzq
* @description 针对表【farm_product】的数据库操作Mapper
* @createDate 2023-03-31 10:19:04
* @Entity com.ruoyi.common.core.domain.entity.FarmProduct
*/
public interface FarmProductMapper extends BaseMapper<FarmProduct> {

    int updateStatusBatchById(@Param("ids") List<Long> ids, @Param("status") Integer status);

    List<FarmProduct> selectListProduct( @Param("productName")String productName,@Param("minPrice") Long minPrice,@Param("maxPrice")  Long maxPrice,@Param("sortName")  String sortName,@Param("categoryId")  Long categoryId);

    FarmProduct selectFarmProductByArticleId(Long id);

    List<FarmProduct> selectAllProduct();

    Long selectProductIdByArticleId(Long id);

    void insertProductAndArticle(@Param("articleId") Long articleId, @Param("productId") Long productId);

    void updateProductAndArticle(@Param("articleId") Long articleId, @Param("productId") Long productId);

    int selectListProductCount(@Param("productName")String productName,@Param("minPrice") Long minPrice,@Param("maxPrice")  Long maxPrice,@Param("sortName")  String sortName,@Param("categoryId")  Long categoryId);
}




